/*
 * sht20.h
 *
 *  Created on: Apr 27, 2023
 *      Author: HP
 */

#ifndef _SHT20_H
#define _SHT20_H

#include "stm32l4xx_hal.h"

#define SHT20_ADDR_WR 0x80
#define SHT20_ADDR_RD 0x81 // SHT20 I2C address 0x40

#define SHT20_SOFT_RESET_CMD			0xFE
#define SHT20_TEMPERATURE_NO_HOLD_CMD	0xF3
#define SHT20_HUMIDITY_NO_HOLD_CMD		0xF5
#define SHT20_TEMPERATURE_HOLD_CMD		0xE3
#define SHT20_HUMIDITY_HOLD_CMD			0xE5



extern short sht20_sample_temp_or_hum(uint8_t cmd);

#endif /* INC_SHT20_H_*/





